//
//  OAuthViewController.swift
//  Weibo
//
//  Created by dongpeng on 16/1/13.
//  Copyright © 2016年 dongpeng. All rights reserved.
//

import UIKit

class OAuthViewController: UIViewController {

    
    let webView = UIWebView()
    
    override func loadView() {
        
        view = webView
        
        
        
    }
    
   @objc private func close() {
        
       dismissViewControllerAnimated(true, completion: nil)
     
        
        
    }
    
    
  private func setNavBar () {
        
        self.navigationItem.leftBarButtonItem = UIBarButtonItem (title: "关闭", style: .Plain, target: self, action: "close")
        
        
        
    }
    
    
    override func viewDidLoad() {
        super.viewDidLoad()

//       只对当前导航视图控制器 有效
//     navigationController?.navigationBar.tintColor = UIColor.orangeColor()

        
        
//      UINavigationBar.appearance().tintColor = UIColor.orangeColor()
        
        
        
        
       setNavBar ()
    }

    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }
    

    /*
    // MARK: - Navigation

    // In a storyboard-based application, you will often want to do a little preparation before navigation
    override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) {
        // Get the new view controller using segue.destinationViewController.
        // Pass the selected object to the new view controller.
    }
    */

}
